package com.aruba.livedata;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

/**
 * Created by aruba on 2021/9/10.
 */
public class CountViewModel extends ViewModel {
    private MutableLiveData<Integer> count;

    public MutableLiveData<Integer> getCount() {
        if (count == null) {
            count = new MutableLiveData<>();
            count.setValue(0);
        }
        return count;
    }
}
